﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Billing.Win;
using Billing.DataObjects;
using Microsoft.Reporting.WinForms;

namespace DSTest
{
    public partial class Form1 : System.Windows.Forms.Form
    {
        public Form1()
        {
            InitializeComponent();
        }


        private void ultraButton3_Click(object sender, EventArgs e)
        {
            //Form2 frm = new Form2();
            //frm.PrintPreview = false;
            //frm.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;

            //foreach (var item in from i in dc.Invoices
            //                     where i.ID > 600 && i.ID < 701
            //                         select i)
            //{
            //    List<ReportParameter> rp = new List<ReportParameter>();
            //    rp.Add(new ReportParameter("invoiceID", item.ID.ToString()));
            //    frm.LoadReport(@"/BillingReports/Invoice", Microsoft.Reporting.WinForms.ProcessingMode.Remote, rp);
            //    frm.LoadReport(@"/BillingReports/InvoiceDetails", Microsoft.Reporting.WinForms.ProcessingMode.Remote, rp);
            //    frm.LoadReport(@"/BillingReports/Invoice", Microsoft.Reporting.WinForms.ProcessingMode.Remote, rp);
            //}
        }

        private void ultraButton4_Click(object sender, EventArgs e)
        {
            ////Transactions.CorrectionTransactionForm frm = new Transactions.CorrectionTransactionForm();
            ////frm.Show();
            ////Billing.Reports.ReportBrowserForm rpb = new Billing.Reports.ReportBrowserForm();
            ////rpb.Show();
            //ServiceReference1.ReportingServiceSoapClient sc = new DSTest.ServiceReference1.ReportingServiceSoapClient();
            //sc.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential("Administrator", "stb2007");
            //sc.LogonUser("Administrator", "stb2007", "Negotiate,NTLM");
            //ServiceReference1.CatalogItem[] CatalogItems = null;
            //sc.ListChildren("BillingReports", false, out CatalogItems);
            //MessageBox.Show(CatalogItems.Count().ToString());
        }

        private void ultraButton5_Click(object sender, EventArgs e)
        {
            Billing.Transactions.PaymentTransferForm frm = new Billing.Transactions.PaymentTransferForm();
            frm.Show();
            // ultraFlowLayoutManager1.
        }
    //    Billing.DataObjects.BillingDataContext dc = new BillingDataContext();
        private void Form1_Load(object sender, EventArgs e)
        {
            //this.invoiceBindingSource.DataSource = dc.Invoices;
            global::Billing.Profile.UserID = -1;
        }

        private void ultraButton1_Click(object sender, EventArgs e)
        {

        }

        private void ultraButton1_Click_1(object sender, EventArgs e)
        {
            this.ultraComboEditor1.Items.Insert(0, this.ultraComboEditor1.Text, this.ultraComboEditor1.Text);
        }

        private void ultraComboEditor1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            this.ultraComboEditor1.DropDown();
        }

        private void ultraComboEditor1_DoubleClick(object sender, EventArgs e)
        {
            this.ultraComboEditor1.DropDown();
        }

        private void button1_Click(object sender, EventArgs e)
        {
           // this.ultraComboEditor1.;
        }

        private void ultraComboEditor1_Click(object sender, EventArgs e)
        {
            this.ultraComboEditor1.DropDown();

        }
    }
}
